package com.agent.platform.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * 会话状态响应DTO
 */
@Data
@Builder
@Schema(description = "会话状态响应")
public class SessionStatusResponse {
    @Schema(description = "会话ID", example = "session-123")
    private String sessionId;

    @Schema(description = "Agent ID", example = "my-agent-1")
    private String agentId;

    @Schema(description = "会话状态", example = "running", allowableValues = {"idle", "running", "stopped", "failed", "completed"})
    private String status;

    @Schema(description = "执行步骤数", example = "15")
    private Integer stepCount;

    @Schema(description = "失败次数", example = "0")
    private Integer failureCount;

    @Schema(description = "总Token使用量", example = "2500")
    private Integer totalTokens;

    @Schema(description = "总成本（美元）", example = "0.05")
    private Double totalCost;

    @Schema(description = "最后一次错误信息", example = "null", nullable = true)
    private String lastError;

    @Schema(description = "会话开始时间", example = "2024-01-15T10:30:00")
    private LocalDateTime startedAt;

    @Schema(description = "会话停止时间", example = "2024-01-15T10:35:00", nullable = true)
    private LocalDateTime stoppedAt;

    @Schema(description = "会话元数据")
    private Map<String, Object> metadata;
}
